package com.example.service.provider.service.impl;


import com.example.common.dto.TestDto;
import com.example.common.vo.TestVo;
import com.example.service.provider.service.ServiceProvider;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

@Service
public class ServiceProviderImpl implements ServiceProvider {

    @Override
    public TestVo service() {
        TestVo testVo = new TestVo();
        return testVo;
    }

    @Override
    public TestVo service(TestDto dto) {
        TestVo testVo = new TestVo();
        testVo.setName(dto.getName())
                .setAge(Math.toIntExact(dto.getAge()))
                .setLocalDate(dto.getLocalDate())
                .setList(dto.getList());
        return testVo;
    }

    @Override
    public TestVo service(MultipartFile multipartFile) {
        System.out.println(multipartFile);
        TestVo testVo = new TestVo();
        return testVo;
    }
}
